@inject NavigationManager NavigationManager
@inject IJSRuntime JSRuntime

@using ClassifiedAds.BlazorWebAssembly.Shared

<CascadingAuthenticationState>
    <Router AppAssembly="@typeof(Program).Assembly" AdditionalAssemblies="new[] { typeof(ClassifiedAds.Blazor.Modules.Core.Components.ConfirmDialog).Assembly}">
        <Found Context="routeData">
            <AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
                <NotAuthorized>
                    Please <a href="/authentication/login?returnUrl=@(Uri.EscapeDataString(NavigationManager.Uri))">Login</a>
                </NotAuthorized>
            </AuthorizeRouteView>
        </Found>
        <NotFound>
            <LayoutView Layout="@typeof(MainLayout)">
                <p>Sorry, there's nothing at this address.</p>
            </LayoutView>
        </NotFound>
    </Router>
</CascadingAuthenticationState>

@code{

}
